﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace MainService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "ICommonService" in both code and config file together.
    [ServiceContract(Namespace = "")] 
    public interface ICommonService
    {
        [OperationContract]
        int AddDatabase(string dbName, bool isDataCaseSenitive, int loggedInUserId, byte[] data,List<int> associatedServices);

        [OperationContract]
        string DeleteDatabase(int dbId, int loggedInUserId);

        [OperationContract]
        string RenameDatabase(int dbId, string newDBName, int loggedInUserId);

        [OperationContract]
        string AssociateDBToService(int dbId, List<int> serviceId, int loggedInUserId);

        [OperationContract]
        DatabaseDetails GetDbDetail(int DbId, int loggedInUserId);

        [OperationContract]
        List<DatabaseDetails> GetClientDBList(int clientId);

        [OperationContract]
        string ImportData(byte[] data, int dbId, int loggedInUserId);

        [OperationContract]
        byte[] ExportData(int dbId, int loggedInUserId);

        [OperationContract]
        string AddScanData(int dbId, int loggedInUserId, string barcodValue, string barcodeResponseValue, int validity);

        [OperationContract]
        Dictionary<int, string> GetServices(int clientId, string hashCode);

    }
}
